import request from '../utils/requst.js'

export function getChannel () {
  return request({
    url: '/v1_0/user/channels'
  })
}

// export const delChannel = (id) => {
//   return request({
//     url: 'xxxxxxxx', // 接口地址
//     method: 'GET'
//   })
// }

export const getAllChannels = () => {
  return request({
    method: 'GET',
    url: '/v1_0/channels'
  })
}
export const addChannels = (channels) => {
  return request({
    method: 'PATCH',
    url: '/v1_0/user/channels',
    data: {
      channels: channels
    }
  })
}
export const delChannel = (channelId) => {
  return request({
    url: '/v1_0/user/channels/' + channelId,
    method: 'DELETE'
  })
}
